package com.itheima.date8;

import java.time.LocalDateTime;

public class Demo07 {

    public static void main(String[] args) {

        LocalDateTime now = LocalDateTime.now();
        System.out.println(now.minusYears(5));
        System.out.println(now.minusMonths(5));
        System.out.println(now.minusDays(5));
        System.out.println(now.minusHours(5));
        System.out.println(now.minusMinutes(5));
        System.out.println(now.minusSeconds(5));
        System.out.println(now.minusWeeks(1));
        System.out.println(now.minusWeeks(-1));
    }
}
